package Editor;

import java.awt.Color;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import javax.swing.JFrame;



public class GUI extends JFrame {
	public GUI() {
		super("Testframe");
		// Standardmethoden
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		this.setSize(500, 500);

		// Anlegen des GridBagLayouts
		GridBagLayout gridBag = new GridBagLayout();
		this.setLayout(gridBag);


		Teil1 r1 =  new Teil1("Auswahl wird hier sein");
		GridBagConstraints constraints4 = new GridBagConstraints(0, 0, 1, 1, 1, 1,
				GridBagConstraints.CENTER, GridBagConstraints.BOTH,
				new Insets(0, 0, 0, 0), 0, 0);
		gridBag.setConstraints(r1, constraints4);
		this.getContentPane().add(r1);
		

		Teil2 r2 = new Teil2("Edito wird hier sein");
		GridBagConstraints constraints = new GridBagConstraints(1, 0, 1, 1, 9, 9,
				GridBagConstraints.CENTER, GridBagConstraints.BOTH,
				new Insets(0, 0, 0, 0), 0, 0);
		gridBag.setConstraints(r2, constraints);
		r2.setOpaque(true);
		r2.setBackground(Color.GREEN);
		this.getContentPane().add(r2);
		
		Teil3 r3 = new Teil3 ("Da hab ich noch keine ahnung");
		GridBagConstraints constraints2 = new GridBagConstraints(0, 1, 1, 1, 1, 1, 
				GridBagConstraints.CENTER, GridBagConstraints.BOTH,
				new Insets(0, 0, 0, 0), 0, 0);
		gridBag.setConstraints(r3, constraints2);
		r3.setOpaque(true);
		r3.setBackground(Color.GREEN);
		this.getContentPane().add(r3);
		
		final Teil4 r4 = new Teil4("TabLeiste");
		GridBagConstraints constraints3 = new GridBagConstraints(1, 1, 1, 1, 9, 1, 
				GridBagConstraints.CENTER, GridBagConstraints.BOTH,
				new Insets(0, 0, 0, 0), 0, 0);
		gridBag.setConstraints(r4, constraints3);
		r4.setOpaque(true);

		r4.setBackground(Color.GREEN);
		this.getContentPane().add(r4);

		this.setVisible(true);
		
		r1.add(r2);
		r1.add(r3);
		r1.add(r3);
		
		r2.add(r1);
		r2.add(r3);
		r2.add(r4);
		
		r3.add(r1);
		r3.add(r2);
		r3.add(r4);
		
		r4.add(r1);
		r4.add(r2);
		r4.add(r3);
		
		
	}

}
